package com.six.apidemic.util;

import java.util.Calendar;

public class DateUtil {

    /**
     * 获取当前时间
     * @return
     */
    public static String getNowTime() {
        Calendar calendars = Calendar.getInstance();

        String year = String.valueOf(calendars.get(Calendar.YEAR));

        String month = String.valueOf(calendars.get(Calendar.MONTH));

        String day = String.valueOf(calendars.get(Calendar.DATE));

        String hour = String.valueOf(calendars.get(Calendar.HOUR));

        String min = String.valueOf(calendars.get(Calendar.MINUTE));

        String second = String.valueOf(calendars.get(Calendar.SECOND));

        return year + "年" + month + "月" + day + "日" + hour + "时" + min + "分" + second + "秒";
    }
}
